The Object class has a special method named finalize() that is called by garbage collector to allow an object to do the necessary cleanup that needs to occur before the memory used by the object are reclaimed. The finalize() method can be overridden by any class that uses system resources (file , db connection) and needs to release those resources or to perform other cleanup as part of implicit destruction by the garbage collector.
Liked By
Write Answer
What is finalize method ?
Join MindStick Community
You have need login or register for voting of answers or question.
Anonymous User
15-Jul-2015